package JavaSE.StreamLearning.OutputStreamClass;

import java.io.File;
import java.io.FileOutputStream;
import java.io.IOException;

/**
 *  测试 字节输出流 写入文件
 */
public class Test {
    public static void main(String[] args) throws IOException {
        FileOutputStream fos = new FileOutputStream(new File("D:\\Java Projects\\Idea2018\\src\\JavaSE.StreamLearning.OutputStreamClass\\OutputTest\\1.txt"));
        byte[] bytes = new byte[3];
        for (int i = 0; i < bytes.length; i++) {
            fos.write(i);
        }
        fos.close();
    }
}
